//
//  SectionModel.m
//  BLDMusic
//
//  Created by dllo on 16/3/17.
//  Copyright © 2016年 白云杰. All rights reserved.
//

#import "SectionModel.h"
#import "DSYCarouselModel.h"

@implementation SectionModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"]) {
        self.secttionId = value;
    }
    if ([key isEqualToString:@"action"]) {
        self.action_type = value[@"type"];
    }
    if ([key isEqualToString:@"data"]) {
        self.dataList = [DSYCarouselModel modelHandleWithArray:value];
    }
}

- (void)setValue:(id)value forKey:(NSString *)key
{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"name"]) {
        self.name = value;
        
        self.nameWidth = [APPTools labelRectWithSize:CGSizeMake(0, 40) labelText:self.name Font:[UIFont systemFontOfSize:17.0f]].width;
    }
}

- (id)valueForUndefinedKey:(NSString *)key
{
    return nil;
}

@end
